package com.gzbugu.bugusys.vo.abs;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.gzbugu.bugusys.vo.Attendance;
import com.gzbugu.bugusys.vo.ContractService;
import com.gzbugu.bugusys.vo.Reimburse;
import com.gzbugu.bugusys.vo.StaffCertificate;
import com.gzbugu.bugusys.vo.StaffDocuments;
import com.gzbugu.bugusys.vo.StaffEducation;
import com.gzbugu.bugusys.vo.StaffExperience;
import com.gzbugu.bugusys.vo.StaffFamily;
import com.gzbugu.bugusys.vo.Travel;
import com.gzbugu.bugusys.vo.Type;
import com.gzbugu.bugusys.vo.User;

/**
 * AbstractStaff entity provides the base persistence definition of the Staff
 * entity. @author MyEclipse Persistence Tools
 */
@MappedSuperclass
public abstract class AbstractStaff implements java.io.Serializable {

	// Fields

	private String staffId;
	private User user;
	private Integer sex;
	private String name;
	private String idnumber;
	private String department;
	private String post;
	private Date hiredate;
	private String formername;
	private String birthplace;
	private String nation;
	private Date birthday;
	private String politicsStatus;
	private String tel;
	private String nativePlace;
	private String address;
	private String zip;
	private String graduateSchool;
	private String education;
	private String photoUrl;
	private Set<ContractService> contractServices = new HashSet<ContractService>(
			0);
	private Set<StaffExperience> staffExperiences = new HashSet<StaffExperience>(
			0);
	private Set<StaffCertificate> staffCertificates = new HashSet<StaffCertificate>(
			0);
	private Set<Travel> travels = new HashSet<Travel>(0);
	private Set<Reimburse> reimburses = new HashSet<Reimburse>(0);
	private Set<StaffDocuments> staffDocumentses = new HashSet<StaffDocuments>(
			0);
	private Set<StaffFamily> staffFamilies = new HashSet<StaffFamily>(0);
	private Set<Attendance> attendances = new HashSet<Attendance>(0);
	private Set<StaffEducation> staffEducations = new HashSet<StaffEducation>(0);

	// Constructors

	/** default constructor */
	public AbstractStaff() {
	}

	/** minimal constructor */
	public AbstractStaff(String staffId) {
		this.staffId = staffId;
	}

	/** full constructor */
	public AbstractStaff(String staffId, User user, Integer sex, String name,
			String idnumber, String department, String post, Date hiredate,
			String formername, String birthplace, String nation, Date birthday,
			String politicsStatus, String tel, String nativePlace,
			String address, String zip, String graduateSchool,
			String education, String photoUrl,
			Set<ContractService> contractServices,
			Set<StaffExperience> staffExperiences,
			Set<StaffCertificate> staffCertificates, Set<Travel> travels,
			Set<Reimburse> reimburses, Set<StaffDocuments> staffDocumentses,
			Set<StaffFamily> staffFamilies, Set<Attendance> attendances,
			Set<StaffEducation> staffEducations) {
		this.staffId = staffId;
		this.user = user;
		this.sex = sex;
		this.name = name;
		this.idnumber = idnumber;
		this.department = department;
		this.post = post;
		this.hiredate = hiredate;
		this.formername = formername;
		this.birthplace = birthplace;
		this.nation = nation;
		this.birthday = birthday;
		this.politicsStatus = politicsStatus;
		this.tel = tel;
		this.nativePlace = nativePlace;
		this.address = address;
		this.zip = zip;
		this.graduateSchool = graduateSchool;
		this.education = education;
		this.photoUrl = photoUrl;
		this.contractServices = contractServices;
		this.staffExperiences = staffExperiences;
		this.staffCertificates = staffCertificates;
		this.travels = travels;
		this.reimburses = reimburses;
		this.staffDocumentses = staffDocumentses;
		this.staffFamilies = staffFamilies;
		this.attendances = attendances;
		this.staffEducations = staffEducations;
	}

	// Property accessors
	@Id
	@Column(name = "staff_id", unique = true, nullable = false, length = 50)
	public String getStaffId() {
		return this.staffId;
	}

	public void setStaffId(String staffId) {
		this.staffId = staffId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "sex_id")
	public Integer getSex() {
		return this.sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	@Column(name = "name")
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "IDnumber", length = 18)
	public String getIdnumber() {
		return this.idnumber;
	}

	public void setIdnumber(String idnumber) {
		this.idnumber = idnumber;
	}

	@Column(name = "department", length = 50)
	public String getDepartment() {
		return this.department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	@Column(name = "post", length = 50)
	public String getPost() {
		return this.post;
	}

	public void setPost(String post) {
		this.post = post;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "hiredate", length = 10)
	public Date getHiredate() {
		return this.hiredate;
	}

	public void setHiredate(Date hiredate) {
		this.hiredate = hiredate;
	}

	@Column(name = "formername")
	public String getFormername() {
		return this.formername;
	}

	public void setFormername(String formername) {
		this.formername = formername;
	}

	@Column(name = "birthplace")
	public String getBirthplace() {
		return this.birthplace;
	}

	public void setBirthplace(String birthplace) {
		this.birthplace = birthplace;
	}

	@Column(name = "nation", length = 50)
	public String getNation() {
		return this.nation;
	}

	public void setNation(String nation) {
		this.nation = nation;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "birthday", length = 10)
	public Date getBirthday() {
		return this.birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	@Column(name = "politics_status", length = 50)
	public String getPoliticsStatus() {
		return this.politicsStatus;
	}

	public void setPoliticsStatus(String politicsStatus) {
		this.politicsStatus = politicsStatus;
	}

	@Column(name = "tel", length = 20)
	public String getTel() {
		return this.tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	@Column(name = "native_place", length = 50)
	public String getNativePlace() {
		return this.nativePlace;
	}

	public void setNativePlace(String nativePlace) {
		this.nativePlace = nativePlace;
	}

	@Column(name = "address")
	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "zip", length = 50)
	public String getZip() {
		return this.zip;
	}

	public void setZip(String zip) {
		this.zip = zip;
	}

	@Column(name = "graduate_school")
	public String getGraduateSchool() {
		return this.graduateSchool;
	}

	public void setGraduateSchool(String graduateSchool) {
		this.graduateSchool = graduateSchool;
	}

	@Column(name = "education")
	public String getEducation() {
		return this.education;
	}

	public void setEducation(String education) {
		this.education = education;
	}

	@Column(name = "photo_url")
	public String getPhotoUrl() {
		return this.photoUrl;
	}

	public void setPhotoUrl(String photoUrl) {
		this.photoUrl = photoUrl;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "staff")
	public Set<ContractService> getContractServices() {
		return this.contractServices;
	}

	public void setContractServices(Set<ContractService> contractServices) {
		this.contractServices = contractServices;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "staff")
	public Set<StaffExperience> getStaffExperiences() {
		return this.staffExperiences;
	}

	public void setStaffExperiences(Set<StaffExperience> staffExperiences) {
		this.staffExperiences = staffExperiences;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "staff")
	public Set<StaffCertificate> getStaffCertificates() {
		return this.staffCertificates;
	}

	public void setStaffCertificates(Set<StaffCertificate> staffCertificates) {
		this.staffCertificates = staffCertificates;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "staff")
	public Set<Travel> getTravels() {
		return this.travels;
	}

	public void setTravels(Set<Travel> travels) {
		this.travels = travels;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "staff")
	public Set<Reimburse> getReimburses() {
		return this.reimburses;
	}

	public void setReimburses(Set<Reimburse> reimburses) {
		this.reimburses = reimburses;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "staff")
	public Set<StaffDocuments> getStaffDocumentses() {
		return this.staffDocumentses;
	}

	public void setStaffDocumentses(Set<StaffDocuments> staffDocumentses) {
		this.staffDocumentses = staffDocumentses;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "staff")
	public Set<StaffFamily> getStaffFamilies() {
		return this.staffFamilies;
	}

	public void setStaffFamilies(Set<StaffFamily> staffFamilies) {
		this.staffFamilies = staffFamilies;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "staff")
	public Set<Attendance> getAttendances() {
		return this.attendances;
	}

	public void setAttendances(Set<Attendance> attendances) {
		this.attendances = attendances;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "staff")
	public Set<StaffEducation> getStaffEducations() {
		return this.staffEducations;
	}

	public void setStaffEducations(Set<StaffEducation> staffEducations) {
		this.staffEducations = staffEducations;
	}

}